package com.example.smart.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.example.smart.enums.AdminReview;
import com.example.smart.enums.AccountStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "管理员")
public class Admin {
    @Schema(description = "管理员编号")
    @TableId(type = IdType.AUTO)
    private Integer adminId;
    @Schema(description = "管理员名称")
    private String adminName;
    @Schema(description = "管理员姓名")
    private String adminRename;
    @Schema(description = "管理员性别（男: 1，女:2）")
    private Integer adminSex;
    @Schema(description = "管理员密码")
    private String password;
    @Schema(description = "管理员加盐")
    private String adminSalt;
    @Schema(description = "管理员角色")
    private Integer adminRole;
    @Schema(description = "管理员部门")
    private Integer adminDept;
    @Schema(description = "管理员头像")
    private String adminAvatar;
    @Schema(description = "联系方式")
    private String adminPhone;
    @Schema(description = "邮箱")
    private String adminEmail;
    @Schema(description = "管理员介招")
    private String adminBio;
    /*@Enumerated(EnumType.ORDINAL)
    private AdminReview adminReview;
    @Enumerated(EnumType.ORDINAL)
    private AccountStatus adminStatus;*/
    @Schema(description = "管理员注册审核（0：未审核，1：待审核，2：审核通过，3：审核失败，4：审核取消）")
    private Integer adminReview;
    @Schema(description = "管理员状态（0：正常，1：冻结，2：黑名单，3：停用，4：封号）")
    private Integer adminStatus;
    @Schema(description = "状态开始时间")
    private Date starStatusTime;
    @Schema(description = "状态结束时间")
    private Date endStatusTime;
    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @Schema(description = "管理员备注")
    private String adminRemark;
    @Schema(description = "是否删除（是:1，否:0）")
    @TableLogic(value = "0", delval = "1")
    @TableField(fill = FieldFill.INSERT)
    private Integer adminIsdelete;
}
